package com.tanhua.server.utils;

import com.tanhua.server.pojo.User;

/**
 * @description:统一验证token
 * @author: 浩克
 * @date: Created in 2021/2/22 21:03
 */
public class UserThreadLocal {

    private static final ThreadLocal<User> LOCAL = new ThreadLocal<>();

    private UserThreadLocal(){}

    public static void set(User user){
        LOCAL.set(user);
    }

    public static User get(){
        return LOCAL.get();
    }

}
